using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using FastFoodToNight.Models.Mapping;

namespace FastFoodToNight.Models
{
    public partial class QLFOODContext : DbContext
    {
        static QLFOODContext()
        {
            Database.SetInitializer<QLFOODContext>(null);
        }

        public QLFOODContext()
            : base("Name=QLFOODContext")
        {
        }

        public DbSet<BanQuanLy> BanQuanLies { get; set; }
        public DbSet<ChiTietDDH> ChiTietDDHs { get; set; }
        public DbSet<DanhMucSanPham> DanhMucSanPhams { get; set; }
        public DbSet<DonDatHang> DonDatHangs { get; set; }
        public DbSet<HinhAnh> HinhAnhs { get; set; }
        public DbSet<HoaDon> HoaDons { get; set; }
        public DbSet<SanPham> SanPhams { get; set; }
        public DbSet<CartItem> CartItems { get; set; }
        public DbSet<sysdiagram> sysdiagrams { get; set; }
        public DbSet<NguoiDung> NguoiDungs { get; set; }
        public DbSet<webpages_Membership> webpages_Membership { get; set; }
        public DbSet<webpages_OAuthMembership> webpages_OAuthMembership { get; set; }
        public DbSet<webpages_Roles> webpages_Roles { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new BanQuanLyMap());
            modelBuilder.Configurations.Add(new ChiTietDDHMap());
            modelBuilder.Configurations.Add(new DanhMucSanPhamMap());
            modelBuilder.Configurations.Add(new DonDatHangMap());
            modelBuilder.Configurations.Add(new HinhAnhMap());
            modelBuilder.Configurations.Add(new HoaDonMap());
            modelBuilder.Configurations.Add(new SanPhamMap());
            modelBuilder.Configurations.Add(new sysdiagramMap());
            modelBuilder.Configurations.Add(new UserProfileMap());
            modelBuilder.Configurations.Add(new webpages_MembershipMap());
            modelBuilder.Configurations.Add(new webpages_OAuthMembershipMap());
            modelBuilder.Configurations.Add(new webpages_RolesMap());
        }
    }
}
